{include file="public/header" /}
<style>
    .layui-input-block{width: 70%}
    .uploadImageBoxes img{width: 80px}
    .uploadImageBoxes{padding-left: 5px;text-align: center}
    .showImages{display: flex}
    #uploadDemoView{
        /*border: 1px dashed #e2e2e2;*/
        padding: 10px;
    }

</style>
<body>
<div class="x-body layui-anim">
    <form class="layui-form" id="form" action="{:url('save')}">
        <input type="hidden" id="id" name="id" value="{$Request.param.id}">

        <div class="layui-form-item">
            <label class="layui-form-label">题目</label>
            <div class="layui-input-block">
                
                <textarea class="layui-textarea" lay-verify="required"  lay-reqtext="请填写题目" placeholder="请填写题目" type="text" rows="4" name="title">{$info?$info.title:''}</textarea>
                
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">题目介绍</label>
            <div class="layui-input-block">
                <textarea class="layui-textarea" lay-reqtext="请填写题目介绍" placeholder="请填写题目介绍" type="text" rows="4" name="desc">{$info?$info.desc:''}</textarea>
            </div>
        </div>
        <div class="layui-form-item sunSelect" data-url="{:url('ProCate/getCate')}" data-value="id" data-name="title">
            <label class="layui-form-label">所属项目分类</label>
            <div class="layui-input-inline">
                <select name="pro_id" data-name="项目" lay-verify="required" lay-reqtext="请选择项目" data-id="{$info?$info.pro_id:''}" lay-filter="sunSelect"></select>
            </div>
           <div class="layui-input-inline">
               <select name="cate_id" data-name="分类" lay-verify="required" lay-reqtext="请选择分类" data-id="{$info?$info.cate_id:''}" lay-filter="sunSelect"></select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input type="number" name="sort"  lay-verify="required" autocomplete="off" placeholder="请输入排序，越小越靠前" class="layui-input"
                       value="{$info?$info.sort:$sort}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">分数</label>
            <div class="layui-input-inline">
                
                <input type="text" name="score"  lay-verify="required" lay-reqtext="请输入分数"
                       placeholder="请输入分数" class="layui-input" value="{$info?$info.score:''}"
                       onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,1})?).*$/g, '$1')">
            </div>
        </div>
        <div class="layui-form-item" style="text-align: center;">
            <button class="layui-btn" lay-filter="save" lay-submit formObj="#form">保存</button>
        </div>

    </form>
</div>
</body>
{include file="public/footer" /}

</html>